package com.itheima.clientAndService01;

import java.io.IOException;
import java.net.DatagramPacket;
import java.net.InetAddress;
import java.net.MulticastSocket;

public class ReceiveZu {
    public static void main(String[] args) throws IOException {
        MulticastSocket ms = new MulticastSocket(11000);
        DatagramPacket dp = new DatagramPacket(new byte[1024],1024);
            ms.joinGroup(InetAddress.getByName("224.0.1.11"));
            ms.receive(dp);
            byte[] date = dp.getData();
            int len = date.length;
            System.out.println(new String(date,0,len));

        ms.close();
    }
}
